<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>我的自定义相册</title>
  <link rel="stylesheet" href="css/images.css">
</head>

<body>

  <div id="app">
    <div>{{title}}</div>
    <!-- 登录的部分 -->
    <div v-if="!loginUser">
      <div>
        用户名：
        <input type="text" v-model="tbUser.username" />
        密码：
        <input type="password" v-model="tbUser.password" />
        图片校验码：
        <input type="text" v-model="imgcode" />
        <img :src="imgSrc" title="点击更换图片" @click="changeImg" />
        <button @click="login">登陆</button>
      </div>
      <div>{{ result }}</div>
    </div>

    <div v-if="loginUser">
      <div>欢迎:{{loginUser.username}}</div>
      <div>
        <div v-for="img in images" :key="img.fid">
          {{img}}
          <img :src="imgUrl(img.fid)" alt="">
        </div>
      </div>
    </div>

  </div>

  <!-- https://www.bootcdn.cn/ -->
  <script src="https://cdn.bootcdn.net/ajax/libs/spark-md5/3.0.0/spark-md5.min.js"></script>
  <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.12/vue.min.js"></script>
  <script src="https://cdn.bootcdn.net/ajax/libs/axios/0.21.1/axios.min.js"></script>
  <script src="https://cdn.bootcdn.net/ajax/libs/qs/6.10.1/qs.min.js"></script>

  <script src="js/ajax.js"></script>
  <script src="js/images.js"></script>
</body>

</html>